//基础返回数据类型
export interface T_ResponseData {
    code: number,
    message: string,
    ok: boolean
}

//平台属性ts类型
export interface T_Attr {
    attrId: number | string,
    valueId: number | string,
    id?: number,
    attrName: string,
    valueName: string
}

//销售属性ts类型
export interface T_saleAttr {
    id?: number,
    saleAttrValueName: string,
    saleAttrId: number | string,
    saleAttrValueId: number | string
}

//商品图片的ts类型
export interface T_SpuImage {
    id?: number,
    createTime?: string,
    updateTime?: string,
    spuId?: number,
    imgName: string,
    imgUrl: string
}

//新增sku的数据类型
export interface T_SkuData {
    category3Id: string | number,
    spuId: string | number,
    tmId: string | number,
    skuName: string,
    price: string | number,
    weight: string | number,
    skuDesc: string,
    isSale: number,
    id?: number,
    skuDefaultImg: string,
    skuAttrValueList: T_Attr[],
    skuSaleAttrValueList: T_saleAttr[],
    skuImageList: T_SpuImage[]
}

//sku接口返回数据的类型
export interface T_SkuResponseData extends T_ResponseData {
    data: {
        records: T_SkuData[],
        total: number,
        size: number,
        current: number,
        orders: [],
        optimizeCountSql: boolean,
        hitCount: boolean,
        contId: null,
        maxLimit: null,
        searchCount: boolean,
        pages: number
    }
}

//sku详细信息返回的数据类型
export interface T_SkuInfoResponseData extends T_ResponseData {
    data: T_SkuData;
}

